<%@ page language="java" pageEncoding="UTF-8"%><!DOCTYPE html><%@ taglib uri="http://java.sun.com/jsp/jstl/core"
	prefix="c"%>
<html>
<head>
<title>个人中心 </title>
<jsp:include page="/head.jsp" />
<link rel="stylesheet" type="text/css" href="assets/css/main.css" />
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-table/bootstrap-table.min.css"" />
<script src="assets/plugins/bootstrap-table/bootstrap-table.min.js" type="text/javascript" charset="utf-8"></script>
<script src="assets/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
	
	<div style="background-color: rgb(233, 236, 239);">
		<div class="container-md">
			<nav aria-label="breadcrumb">
				<ol class="breadcrumb">
					<li class="breadcrumb-item"><a href="./">首页</a></li>
					<li class="breadcrumb-item ">个人中心</li>
					<li class="breadcrumb-item active">修改登录密码</li>
				</ol>
			</nav>
		</div>
	</div>
	<div class="container-md">
		<div class="row">
			<div class="col-sm-3 left-menu">
				<div class="card bg-primary">
					<div class="card-header text-white"><i class="fa fa-list mr-2"></i>个人中心</div>
					<div class="list-group">
						<a href="usercenter/user1.jsp" class="list-group-item list-group-item-action }">
							修改个人信息</a> 
						<a href="usercenter/user2.jsp" class="list-group-item list-group-item-action${param.action=='my-2'?' active':'' }">
							修改个人头像</a> 
						<a href="usercenter/user3.jsp" class="list-group-item list-group-item-actionactive">
							修改登录密码</a>
						<a href="usercenter/user4.jsp" class="list-group-item list-group-item-action${param.action=='my-4'?' active':'' }">
							收货地址管理</a> 
					</div>
				</div>
				<div class="card bg-primary mt-2">
					<div class="card-header text-white"><i class="fa fa-list mr-2"></i>我的订单</div>
					<div class="list-group">
						<a href="usercenter/order1.jsp" class="list-group-item list-group-item-action${param.action=='o-0'?' active':'' }">
							待付款</a>
						<a href="usercenter/order2.jsp" class="list-group-item list-group-item-action${param.action=='o-1'?' active':'' }">
							待发货</a>
						<a href="usercenter/order3.jsp" class="list-group-item list-group-item-action${param.action=='o-2'?' active':'' }">
							待收货</a>
						<a href="usercenter/order4.jsp" class="list-group-item list-group-item-action${param.action=='o-3'?' active':'' }">
							评价/完成</a>
						
					</div>
				</div>
				
				
			 </div>
			<div class="col-sm-9" style="border: solid rgba(0, 0, 0, 0.1) 1px; box-shadow:0 0 .3rem rgba(0, 0, 0, 0.3); border-radius:5px; padding: 10px; z-index:1;">
				
				
				
				<!--   主内容写这里！！！！  -->
				
				<h2>修改登录密码：</h2>
				<hr />
	  

		      <div class="card container-md">
        <div class="card-body">
          <form >
           <input type="hidden" value ="${user.hdlUserId }" id="hdlUserId">
            <div class="form-group row">
              <label class="col-sm-4 col-form-label text-right"><b class="text-danger">*</b>原密码</label>
              <div class="col-sm-3">
                <input  required="required"  name="hdlUserRealname" type="password" 
                   class="form-control _ymm"  value=""  >
              </div>
            </div>
            
            <div class="form-group row">
              <label class="col-sm-4 col-form-label text-right "><b class="text-danger">*</b>新密码</label>
              <div class="col-sm-3">
                <input   required="required"  name="hdlUserRealname"  type="password" 
                  class="form-control _xmm" value="">
              </div>
            </div>
            
            <div class="form-group row">
              <label class="col-sm-4 col-form-label text-right"><b class="text-danger">*</b>确认新密码</label>
              <div class="col-sm-3">
                <input   required="required"  name="hdlUserRealname" type="password" 
                  title="由3到20个单词字符组成" class="form-control  _qrmm" value="">
              </div>
            </div>

            
           
            

           
              <div class="col-sm-4 offset-sm-3">
                
                <input    class=" _password" name="hdlUserRealname" type="button" value="修改">
              </div>
           

          </form>
        </div>
      </div>
			
			
			
			
			</div> 
		</div>
	</div> 

    <script>
    
       
    $("._password").on("click",function(){
    	
    	var id = $("#hdlUserId").val();
     	var psd = $("._xmm").val();
    	
        if(	${user.hdlUserPsd } == $("._ymm").val()){
        	
        	
        	if( ($("._qrmm") == 0) || ($("._xmm").val() == 0) ){
        	 
        		sys.toastr.error("输入不能为空");
        	}
        	else{
        		if($("._qrmm").val() == $("._xmm").val()){
        			
        			sys.toastr.success("修改成功");
        			    $.post(
       				      "userpasswordupdate.let",
       				      {id:id,password:psd},
       				      function (date) {
       				    	
       				      }
       						
       					 ,"json"
       					)   
        			
            		
            	}else{
            		sys.toastr.error("2次密码输入不一致");
            	}
        		
        	}
        	
        }else{
        	sys.toastr.error("原密码输入错误");
        }
       
    	
    })
    </script>
</body>
</html>
